<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>服务权益 - 邦伴用户端</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <style>
    :root {
      --primary: #ff7e2d;
      --primary-light: #fff3ea;
      --border: #f0f0f0;
      --text-main: #222;
      --text-sub: #888;
    }
    
    body {
      font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
      background-color: #f8f8f8;
      color: var(--text-main);
    }
    
    .app-container {
      width: 375px;
      height: 812px;
      margin: 0 auto;
      background: #fff;
      position: relative;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
      overflow-y: auto;
    }
    
    .primary-color {
      color: var(--primary);
    }
    
    .primary-bg {
      background-color: var(--primary);
    }
    
    .primary-light-bg {
      background-color: var(--primary-light);
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-outline {
      border: 1px solid var(--primary);
      color: var(--primary);
    }
    
    .card {
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    
    .tab-active {
      color: var(--primary);
      border-bottom: 2px solid var(--primary);
    }
    
    .service-card {
      position: relative;
      overflow: hidden;
      border-radius: 12px;
    }
    
    .service-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: var(--primary);
    }
    
    .service-card.expired::before {
      background: #d1d5db;
    }
  </style>
</head>
<body>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <div class="sticky top-0 z-10 bg-white border-b border-gray-100 px-4 py-3 flex items-center">
      <a href="member_center.html" class="mr-2">
        <i class="fas fa-arrow-left text-lg"></i>
      </a>
      <h1 class="text-lg font-medium flex-1 text-center">服务权益</h1>
    </div>
    
    <!-- 标签页 -->
    <div class="flex border-b border-gray-200">
      <div class="flex-1 text-center py-3 tab-active" id="tab-all">
        全部
      </div>
      <div class="flex-1 text-center py-3 text-gray-500" id="tab-unused">
        未使用
      </div>
      <div class="flex-1 text-center py-3 text-gray-500" id="tab-used">
        已使用
      </div>
      <div class="flex-1 text-center py-3 text-gray-500" id="tab-expired">
        已过期
      </div>
    </div>
    
    <!-- 全部权益 -->
    <div class="p-4" id="content-all">
      <!-- 未使用服务权益 -->
      <div class="mb-6">
        <h2 class="text-base font-medium mb-3">未使用</h2>
        
        <div class="service-card bg-white mb-3">
          <div class="p-4">
            <div class="flex items-center justify-between mb-2">
              <div class="flex items-center">
                <i class="fas fa-home-alt primary-color text-lg mr-2"></i>
                <h3 class="font-medium">家政保洁服务</h3>
              </div>
              <span class="text-xs primary-color px-2 py-0.5 bg-primary-light rounded">未使用</span>
            </div>
            
            <div class="text-sm text-gray-500 mb-3">
              <p>服务内容：全屋深度清洁，3小时服务</p>
              <p>有效期至：2024-06-30</p>
            </div>
            
            <div class="flex justify-between items-center">
              <div class="text-xs text-gray-500">
                <span>会员等级赠送</span>
              </div>
              <a href="service_verification.html" class="btn-primary text-sm px-4 py-1 rounded-full">立即使用</a>
            </div>
          </div>
        </div>
        
        <div class="service-card bg-white">
          <div class="p-4">
            <div class="flex items-center justify-between mb-2">
              <div class="flex items-center">
                <i class="fas fa-hospital primary-color text-lg mr-2"></i>
                <h3 class="font-medium">医院陪护服务</h3>
              </div>
              <span class="text-xs primary-color px-2 py-0.5 bg-primary-light rounded">未使用</span>
            </div>
            
            <div class="text-sm text-gray-500 mb-3">
              <p>服务内容：医院陪护，8小时服务</p>
              <p>有效期至：2024-08-15</p>
            </div>
            
            <div class="flex justify-between items-center">
              <div class="text-xs text-gray-500">
                <span>积分兑换</span>
              </div>
              <a href="service_verification.html" class="btn-primary text-sm px-4 py-1 rounded-full">立即使用</a>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 已使用服务权益 -->
      <div class="mb-6">
        <h2 class="text-base font-medium mb-3">已使用</h2>
        
        <div class="service-card bg-white">
          <div class="p-4">
            <div class="flex items-center justify-between mb-2">
              <div class="flex items-center">
                <i class="fas fa-user-md text-gray-400 text-lg mr-2"></i>
                <h3 class="font-medium text-gray-600">健康体检服务</h3>
              </div>
              <span class="text-xs text-gray-500 px-2 py-0.5 bg-gray-100 rounded">已使用</span>
            </div>
            
            <div class="text-sm text-gray-500 mb-3">
              <p>服务内容：全身体检，含血常规、B超等</p>
              <p>使用时间：2023-09-20</p>
            </div>
            
            <div class="flex justify-between items-center">
              <div class="text-xs text-gray-500">
                <span>会员等级赠送</span>
              </div>
              <a href="#" class="text-sm primary-color">查看详情</a>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 已过期服务权益 -->
      <div>
        <h2 class="text-base font-medium mb-3">已过期</h2>
        
        <div class="service-card expired bg-white">
          <div class="p-4">
            <div class="flex items-center justify-between mb-2">
              <div class="flex items-center">
                <i class="fas fa-baby text-gray-400 text-lg mr-2"></i>
                <h3 class="font-medium text-gray-600">母婴护理服务</h3>
              </div>
              <span class="text-xs text-gray-500 px-2 py-0.5 bg-gray-100 rounded">已过期</span>
            </div>
            
            <div class="text-sm text-gray-500 mb-3">
              <p>服务内容：新生儿护理，4小时服务</p>
              <p>过期时间：2023-08-15</p>
            </div>
            
            <div class="flex justify-between items-center">
              <div class="text-xs text-gray-500">
                <span>积分兑换</span>
              </div>
              <a href="#" class="text-sm text-gray-500">已过期</a>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 未使用权益 -->
    <div class="p-4 hidden" id="content-unused">
      <div class="service-card bg-white mb-3">
        <div class="p-4">
          <div class="flex items-center justify-between mb-2">
            <div class="flex items-center">
              <i class="fas fa-home-alt primary-color text-lg mr-2"></i>
              <h3 class="font-medium">家政保洁服务</h3>
            </div>
            <span class="text-xs primary-color px-2 py-0.5 bg-primary-light rounded">未使用</span>
          </div>
          
          <div class="text-sm text-gray-500 mb-3">
            <p>服务内容：全屋深度清洁，3小时服务</p>
            <p>有效期至：2024-06-30</p>
          </div>
          
          <div class="flex justify-between items-center">
            <div class="text-xs text-gray-500">
              <span>会员等级赠送</span>
            </div>
            <a href="service_verification.html" class="btn-primary text-sm px-4 py-1 rounded-full">立即使用</a>
          </div>
        </div>
      </div>
      
      <div class="service-card bg-white">
        <div class="p-4">
          <div class="flex items-center justify-between mb-2">
            <div class="flex items-center">
              <i class="fas fa-hospital primary-color text-lg mr-2"></i>
              <h3 class="font-medium">医院陪护服务</h3>
            </div>
            <span class="text-xs primary-color px-2 py-0.5 bg-primary-light rounded">未使用</span>
          </div>
          
          <div class="text-sm text-gray-500 mb-3">
            <p>服务内容：医院陪护，8小时服务</p>
            <p>有效期至：2024-08-15</p>
          </div>
          
          <div class="flex justify-between items-center">
            <div class="text-xs text-gray-500">
              <span>积分兑换</span>
            </div>
            <a href="service_verification.html" class="btn-primary text-sm px-4 py-1 rounded-full">立即使用</a>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 已使用权益 -->
    <div class="p-4 hidden" id="content-used">
      <div class="service-card bg-white">
        <div class="p-4">
          <div class="flex items-center justify-between mb-2">
            <div class="flex items-center">
              <i class="fas fa-user-md text-gray-400 text-lg mr-2"></i>
              <h3 class="font-medium text-gray-600">健康体检服务</h3>
            </div>
            <span class="text-xs text-gray-500 px-2 py-0.5 bg-gray-100 rounded">已使用</span>
          </div>
          
          <div class="text-sm text-gray-500 mb-3">
            <p>服务内容：全身体检，含血常规、B超等</p>
            <p>使用时间：2023-09-20</p>
          </div>
          
          <div class="flex justify-between items-center">
            <div class="text-xs text-gray-500">
              <span>会员等级赠送</span>
            </div>
            <a href="#" class="text-sm primary-color">查看详情</a>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 已过期权益 -->
    <div class="p-4 hidden" id="content-expired">
      <div class="service-card expired bg-white">
        <div class="p-4">
          <div class="flex items-center justify-between mb-2">
            <div class="flex items-center">
              <i class="fas fa-baby text-gray-400 text-lg mr-2"></i>
              <h3 class="font-medium text-gray-600">母婴护理服务</h3>
            </div>
            <span class="text-xs text-gray-500 px-2 py-0.5 bg-gray-100 rounded">已过期</span>
          </div>
          
          <div class="text-sm text-gray-500 mb-3">
            <p>服务内容：新生儿护理，4小时服务</p>
            <p>过期时间：2023-08-15</p>
          </div>
          
          <div class="flex justify-between items-center">
            <div class="text-xs text-gray-500">
              <span>积分兑换</span>
            </div>
            <a href="#" class="text-sm text-gray-500">已过期</a>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 空状态 -->
    <div class="hidden p-4 flex flex-col items-center justify-center h-80" id="content-empty">
      <div class="w-24 h-24 rounded-full bg-gray-100 flex items-center justify-center mb-4">
        <i class="fas fa-ticket-alt text-gray-300 text-3xl"></i>
      </div>
      <p class="text-gray-500 mb-4">暂无相关服务权益</p>
      <a href="member_mall.html" class="btn-primary px-8 py-2 rounded-full">去兑换</a>
    </div>
    
    <!-- 底部空间 -->
    <div class="pb-8"></div>
  </div>

  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 标签页切换
      const tabs = [
        document.getElementById('tab-all'),
        document.getElementById('tab-unused'),
        document.getElementById('tab-used'),
        document.getElementById('tab-expired')
      ];
      
      const contents = [
        document.getElementById('content-all'),
        document.getElementById('content-unused'),
        document.getElementById('content-used'),
        document.getElementById('content-expired')
      ];
      
      tabs.forEach((tab, index) => {
        tab.addEventListener('click', function() {
          // 更新标签样式
          tabs.forEach(t => {
            t.classList.remove('tab-active');
            t.classList.add('text-gray-500');
          });
          this.classList.add('tab-active');
          this.classList.remove('text-gray-500');
          
          // 显示对应内容
          contents.forEach(content => content.classList.add('hidden'));
          contents[index].classList.remove('hidden');
          
          // 检查是否需要显示空状态
          if (index === 3 && document.querySelectorAll('#content-expired .service-card').length === 0) {
            contents[index].classList.add('hidden');
            document.getElementById('content-empty').classList.remove('hidden');
          } else {
            document.getElementById('content-empty').classList.add('hidden');
          }
        });
      });
    });
  </script>
</body>
</html> 